package com.boot.web.serviceImpl;

import com.boot.web.dto.AppMailListDTO;
import com.boot.web.vo.CustomerVO;
import com.boot.web.vo.CustomerVO_1;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.boot.web.dao.CustomerDao;
import com.boot.web.entity.Customer;
import com.boot.web.service.CustomerService;
import com.boot.base.serviceImpl.BaseServiceImpl;

import java.util.List;
import java.util.Map;

/**
 * 客户信息业务层接口实现
 * @author 【zhouJie】
 * @date 2021-06-02 08:43:22
 */
@Service
public class CustomerServiceImpl extends BaseServiceImpl<Customer> implements CustomerService {

    private static final Logger logger = LoggerFactory.getLogger(CustomerServiceImpl.class);

    @Autowired
    private CustomerDao customerDao;

    @Override
    public List<CustomerVO_1> getCustomerVOPageList(Map<String, Object> map) {
        return customerDao.queryCustomerVOPageList(map);
    }

    @Override
    public List<CustomerVO> getAllVO() {
        return customerDao.queryAllVO();
    }

    @Override
    public int recursionCustomer(int levelId, Integer id) {
        int temp = 0;
        boolean boo = true;
        if(boo){
            List<Customer> list1 = customerDao.queryCustomerByParentId(id);
            if(list1.size() > 0){
                for(Customer c1 : list1) {
                    if (boo) {
                        if(c1.getLevelCopyId() >= levelId){
                            temp += 1;
                            boo = false;
                            break;
                        }else{
                            if(boo) {
                                List<Customer> list2 = customerDao.queryCustomerByParentId(c1.getId());
                                if(list2.size() > 0){
                                    for(Customer c2 : list2){
                                        if(boo){
                                            if(c2.getLevelCopyId() >= levelId){
                                                temp += 1;
                                                boo = false;
                                                break;
                                            }else{
                                                if(boo){
                                                    List<Customer> list3 = customerDao.queryCustomerByParentId(c2.getId());
                                                    if(list3.size() > 0){
                                                        for(Customer c3 : list3){
                                                            if(boo){
                                                                if(c3.getLevelCopyId() >= levelId){
                                                                    temp += 1;
                                                                    boo = false;
                                                                    break;
                                                                }else{
                                                                    if(boo){
                                                                        List<Customer> list4 = customerDao.queryCustomerByParentId(c3.getId());
                                                                        if(list4.size() > 0){
                                                                            for(Customer c4 : list4){
                                                                                if(c4.getLevelCopyId() >= levelId){
                                                                                    temp += 1;
                                                                                    boo = false;
                                                                                    break;
                                                                                }else{
                                                                                    if(boo){
                                                                                        List<Customer> list5 = customerDao.queryCustomerByParentId(c4.getId());
                                                                                        if(list5.size() > 0){
                                                                                            for(Customer c5 : list5){
                                                                                                if(boo){
                                                                                                    if(c5.getLevelCopyId() >= levelId){
                                                                                                        temp += 1;
                                                                                                        boo = false;
                                                                                                        break;
                                                                                                    }else{
                                                                                                        if(boo){
                                                                                                            List<Customer> list6 = customerDao.queryCustomerByParentId(c5.getId());
                                                                                                            if(list6.size() > 0){
                                                                                                                for(Customer c6 : list6){
                                                                                                                    if(boo){
                                                                                                                        if(c6.getLevelCopyId() >= levelId){
                                                                                                                            temp += 1;
                                                                                                                            boo = false;
                                                                                                                            break;
                                                                                                                        }else{
                                                                                                                            if(boo){
                                                                                                                                List<Customer> list7 = customerDao.queryCustomerByParentId(c6.getId());
                                                                                                                                if(list7.size() > 0){
                                                                                                                                    for(Customer c7 : list7){
                                                                                                                                        if(boo){
                                                                                                                                            if(c7.getLevelCopyId() >= levelId){
                                                                                                                                                temp += 1;
                                                                                                                                                boo = false;
                                                                                                                                                break;
                                                                                                                                            }else{
                                                                                                                                                if(boo){
                                                                                                                                                    List<Customer> list8 = customerDao.queryCustomerByParentId(c7.getId());
                                                                                                                                                    if(list8.size() > 0){
                                                                                                                                                        for(Customer c8 : list8){
                                                                                                                                                            if(boo){
                                                                                                                                                                if(c8.getLevelCopyId() >= levelId){
                                                                                                                                                                    temp += 1;
                                                                                                                                                                    boo = false;
                                                                                                                                                                    break;
                                                                                                                                                                }else{
                                                                                                                                                                    if(boo){
                                                                                                                                                                        List<Customer> list9 = customerDao.queryCustomerByParentId(c8.getId());
                                                                                                                                                                        if(list9.size() > 0){
                                                                                                                                                                            for(Customer c9 : list9){
                                                                                                                                                                                if(boo){
                                                                                                                                                                                    if(c9.getLevelCopyId() >= levelId){
                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                        boo = false;
                                                                                                                                                                                        break;
                                                                                                                                                                                    }else{
                                                                                                                                                                                        if(boo){
                                                                                                                                                                                            List<Customer> list10 = customerDao.queryCustomerByParentId(c9.getId());
                                                                                                                                                                                            if(list10.size() > 0){
                                                                                                                                                                                                for(Customer c10 : list10){
                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                        if(c10.getLevelCopyId() >= levelId){
                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                            break;
                                                                                                                                                                                                        }else{
                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                List<Customer> list11 = customerDao.queryCustomerByParentId(c10.getId());
                                                                                                                                                                                                                if(list11.size() > 0){
                                                                                                                                                                                                                    for(Customer c11 : list11){
                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                            if(c11.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                    List<Customer> list12 = customerDao.queryCustomerByParentId(c11.getId());
                                                                                                                                                                                                                                    if(list12.size() > 0){
                                                                                                                                                                                                                                        for(Customer c12 : list11){
                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                if(c12.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                        List<Customer> list13 = customerDao.queryCustomerByParentId(c12.getId());
                                                                                                                                                                                                                                                        if(list13.size() > 0){
                                                                                                                                                                                                                                                            for(Customer c13 : list13){
                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                    if(c13.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                            List<Customer> list14 = customerDao.queryCustomerByParentId(c13.getId());
                                                                                                                                                                                                                                                                            if(list14.size() > 0){
                                                                                                                                                                                                                                                                                for(Customer c14 : list13){
                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                        if(c14.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                List<Customer> list15 = customerDao.queryCustomerByParentId(c14.getId());
                                                                                                                                                                                                                                                                                                if(list15.size() > 0){
                                                                                                                                                                                                                                                                                                    for(Customer c15 : list15){
                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                            if(c15.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                    List<Customer> list16 = customerDao.queryCustomerByParentId(c15.getId());
                                                                                                                                                                                                                                                                                                                    if(list16.size() > 0){
                                                                                                                                                                                                                                                                                                                        for(Customer c16 : list16){
                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                if(c16.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                        List<Customer> list17 = customerDao.queryCustomerByParentId(c16.getId());
                                                                                                                                                                                                                                                                                                                                        if(list17.size() > 0){
                                                                                                                                                                                                                                                                                                                                            for(Customer c17 : list17){
                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                    if(c17.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                            List<Customer> list18 = customerDao.queryCustomerByParentId(c17.getId());
                                                                                                                                                                                                                                                                                                                                                            if(list18.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                for(Customer c18 : list18){
                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                        if(c18.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list19 = customerDao.queryCustomerByParentId(c18.getId());
                                                                                                                                                                                                                                                                                                                                                                                if(list19.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c19 : list19){
                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                            if(c19.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list20 = customerDao.queryCustomerByParentId(c19.getId());
                                                                                                                                                                                                                                                                                                                                                                                                    if(list20.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c20 : list20){
                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                if(c20.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list21 = customerDao.queryCustomerByParentId(c20.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                        if(list21.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c21 : list21){
                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c21.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                            List<Customer> list22 = customerDao.queryCustomerByParentId(c21.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                            if(list22.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                for(Customer c22 : list22){
                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(c22.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list23 = customerDao.queryCustomerByParentId(c22.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(list23.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c23 : list23){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(c23.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list24 = customerDao.queryCustomerByParentId(c23.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(list24.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c24 : list24){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(c24.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list25 = customerDao.queryCustomerByParentId(c24.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(list25.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c25 : list25){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c25.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            List<Customer> list26 = customerDao.queryCustomerByParentId(c25.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(list26.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                for(Customer c26 : list26){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(c26.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list27 = customerDao.queryCustomerByParentId(c26.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(list27.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c27 : list27){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(c27.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list28 = customerDao.queryCustomerByParentId(c27.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(list28.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c28 : list28){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(c28.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list29 = customerDao.queryCustomerByParentId(c28.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(list29.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c29 : list29){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c29.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            List<Customer> list30 = customerDao.queryCustomerByParentId(c29.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(list30.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                for(Customer c30 : list30){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(c30.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list31 = customerDao.queryCustomerByParentId(c30.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(list31.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c31 : list31){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(c31.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list32 = customerDao.queryCustomerByParentId(c31.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(list32.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c32 : list32){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(c32.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list33 = customerDao.queryCustomerByParentId(c32.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(list33.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c33 : list33){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c33.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            List<Customer> list34 = customerDao.queryCustomerByParentId(c33.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(list34.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                for(Customer c34 : list34){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(c34.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list35 = customerDao.queryCustomerByParentId(c34.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(list35.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c35 : list35){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(c35.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list36 = customerDao.queryCustomerByParentId(c35.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(list36.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c36 : list36){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(c36.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list37 = customerDao.queryCustomerByParentId(c36.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(list37.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c37 : list37){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c37.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            List<Customer> list38 = customerDao.queryCustomerByParentId(c37.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(list38.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                for(Customer c38 : list38){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(c38.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list39 = customerDao.queryCustomerByParentId(c38.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(list39.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c39 : list39){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(c39.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list40 = customerDao.queryCustomerByParentId(c39.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(list40.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c40 : list40){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(c40.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list41 = customerDao.queryCustomerByParentId(c40.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(list41.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c41 : list41){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c41.getLevelCopyId() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                }
                                                                                                                                                                                                                            }
                                                                                                                                                                                                                        }
                                                                                                                                                                                                                    }
                                                                                                                                                                                                                }
                                                                                                                                                                                                            }
                                                                                                                                                                                                        }
                                                                                                                                                                                                    }
                                                                                                                                                                                                }
                                                                                                                                                                                            }
                                                                                                                                                                                        }
                                                                                                                                                                                    }
                                                                                                                                                                                }
                                                                                                                                                                            }
                                                                                                                                                                        }
                                                                                                                                                                    }
                                                                                                                                                                }
                                                                                                                                                            }
                                                                                                                                                        }
                                                                                                                                                    }
                                                                                                                                                }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                        }
                                                                                                                    }
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return temp;
    }

    @Override
    public int recursionCustomer_4(int levelId, Integer id) {
        int temp = 0;
        boolean boo = true;
        if(boo){
            List<Customer> list1 = customerDao.queryCustomerByParentId(id);
            if(list1.size() > 0){
                for(Customer c1 : list1) {
                    if (boo) {
                        if(c1.getLevelCopy4Id() >= levelId){
                            temp += 1;
                            boo = false;
                            break;
                        }else{
                            if(boo) {
                                List<Customer> list2 = customerDao.queryCustomerByParentId(c1.getId());
                                if(list2.size() > 0){
                                    for(Customer c2 : list2){
                                        if(boo){
                                            if(c2.getLevelCopy4Id() >= levelId){
                                                temp += 1;
                                                boo = false;
                                                break;
                                            }else{
                                                if(boo){
                                                    List<Customer> list3 = customerDao.queryCustomerByParentId(c2.getId());
                                                    if(list3.size() > 0){
                                                        for(Customer c3 : list3){
                                                            if(boo){
                                                                if(c3.getLevelCopy4Id() >= levelId){
                                                                    temp += 1;
                                                                    boo = false;
                                                                    break;
                                                                }else{
                                                                    if(boo){
                                                                        List<Customer> list4 = customerDao.queryCustomerByParentId(c3.getId());
                                                                        if(list4.size() > 0){
                                                                            for(Customer c4 : list4){
                                                                                if(c4.getLevelCopy4Id() >= levelId){
                                                                                    temp += 1;
                                                                                    boo = false;
                                                                                    break;
                                                                                }else{
                                                                                    if(boo){
                                                                                        List<Customer> list5 = customerDao.queryCustomerByParentId(c4.getId());
                                                                                        if(list5.size() > 0){
                                                                                            for(Customer c5 : list5){
                                                                                                if(boo){
                                                                                                    if(c5.getLevelCopy4Id() >= levelId){
                                                                                                        temp += 1;
                                                                                                        boo = false;
                                                                                                        break;
                                                                                                    }else{
                                                                                                        if(boo){
                                                                                                            List<Customer> list6 = customerDao.queryCustomerByParentId(c5.getId());
                                                                                                            if(list6.size() > 0){
                                                                                                                for(Customer c6 : list6){
                                                                                                                    if(boo){
                                                                                                                        if(c6.getLevelCopy4Id() >= levelId){
                                                                                                                            temp += 1;
                                                                                                                            boo = false;
                                                                                                                            break;
                                                                                                                        }else{
                                                                                                                            if(boo){
                                                                                                                                List<Customer> list7 = customerDao.queryCustomerByParentId(c6.getId());
                                                                                                                                if(list7.size() > 0){
                                                                                                                                    for(Customer c7 : list7){
                                                                                                                                        if(boo){
                                                                                                                                            if(c7.getLevelCopy4Id() >= levelId){
                                                                                                                                                temp += 1;
                                                                                                                                                boo = false;
                                                                                                                                                break;
                                                                                                                                            }else{
                                                                                                                                                if(boo){
                                                                                                                                                    List<Customer> list8 = customerDao.queryCustomerByParentId(c7.getId());
                                                                                                                                                    if(list8.size() > 0){
                                                                                                                                                        for(Customer c8 : list8){
                                                                                                                                                            if(boo){
                                                                                                                                                                if(c8.getLevelCopy4Id() >= levelId){
                                                                                                                                                                    temp += 1;
                                                                                                                                                                    boo = false;
                                                                                                                                                                    break;
                                                                                                                                                                }else{
                                                                                                                                                                    if(boo){
                                                                                                                                                                        List<Customer> list9 = customerDao.queryCustomerByParentId(c8.getId());
                                                                                                                                                                        if(list9.size() > 0){
                                                                                                                                                                            for(Customer c9 : list9){
                                                                                                                                                                                if(boo){
                                                                                                                                                                                    if(c9.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                        boo = false;
                                                                                                                                                                                        break;
                                                                                                                                                                                    }else{
                                                                                                                                                                                        if(boo){
                                                                                                                                                                                            List<Customer> list10 = customerDao.queryCustomerByParentId(c9.getId());
                                                                                                                                                                                            if(list10.size() > 0){
                                                                                                                                                                                                for(Customer c10 : list10){
                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                        if(c10.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                            break;
                                                                                                                                                                                                        }else{
                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                List<Customer> list11 = customerDao.queryCustomerByParentId(c10.getId());
                                                                                                                                                                                                                if(list11.size() > 0){
                                                                                                                                                                                                                    for(Customer c11 : list11){
                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                            if(c11.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                    List<Customer> list12 = customerDao.queryCustomerByParentId(c11.getId());
                                                                                                                                                                                                                                    if(list12.size() > 0){
                                                                                                                                                                                                                                        for(Customer c12 : list11){
                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                if(c12.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                        List<Customer> list13 = customerDao.queryCustomerByParentId(c12.getId());
                                                                                                                                                                                                                                                        if(list13.size() > 0){
                                                                                                                                                                                                                                                            for(Customer c13 : list13){
                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                    if(c13.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                            List<Customer> list14 = customerDao.queryCustomerByParentId(c13.getId());
                                                                                                                                                                                                                                                                            if(list14.size() > 0){
                                                                                                                                                                                                                                                                                for(Customer c14 : list13){
                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                        if(c14.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                List<Customer> list15 = customerDao.queryCustomerByParentId(c14.getId());
                                                                                                                                                                                                                                                                                                if(list15.size() > 0){
                                                                                                                                                                                                                                                                                                    for(Customer c15 : list15){
                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                            if(c15.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                    List<Customer> list16 = customerDao.queryCustomerByParentId(c15.getId());
                                                                                                                                                                                                                                                                                                                    if(list16.size() > 0){
                                                                                                                                                                                                                                                                                                                        for(Customer c16 : list16){
                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                if(c16.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                        List<Customer> list17 = customerDao.queryCustomerByParentId(c16.getId());
                                                                                                                                                                                                                                                                                                                                        if(list17.size() > 0){
                                                                                                                                                                                                                                                                                                                                            for(Customer c17 : list17){
                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                    if(c17.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                            List<Customer> list18 = customerDao.queryCustomerByParentId(c17.getId());
                                                                                                                                                                                                                                                                                                                                                            if(list18.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                for(Customer c18 : list18){
                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                        if(c18.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list19 = customerDao.queryCustomerByParentId(c18.getId());
                                                                                                                                                                                                                                                                                                                                                                                if(list19.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c19 : list19){
                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                            if(c19.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list20 = customerDao.queryCustomerByParentId(c19.getId());
                                                                                                                                                                                                                                                                                                                                                                                                    if(list20.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c20 : list20){
                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                if(c20.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list21 = customerDao.queryCustomerByParentId(c20.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                        if(list21.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c21 : list21){
                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c21.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                            List<Customer> list22 = customerDao.queryCustomerByParentId(c21.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                            if(list22.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                for(Customer c22 : list22){
                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(c22.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list23 = customerDao.queryCustomerByParentId(c22.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(list23.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c23 : list23){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(c23.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list24 = customerDao.queryCustomerByParentId(c23.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(list24.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c24 : list24){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(c24.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list25 = customerDao.queryCustomerByParentId(c24.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(list25.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c25 : list25){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c25.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            List<Customer> list26 = customerDao.queryCustomerByParentId(c25.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(list26.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                for(Customer c26 : list26){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(c26.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list27 = customerDao.queryCustomerByParentId(c26.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(list27.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c27 : list27){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(c27.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list28 = customerDao.queryCustomerByParentId(c27.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(list28.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c28 : list28){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(c28.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list29 = customerDao.queryCustomerByParentId(c28.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(list29.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c29 : list29){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c29.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            List<Customer> list30 = customerDao.queryCustomerByParentId(c29.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(list30.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                for(Customer c30 : list30){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(c30.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list31 = customerDao.queryCustomerByParentId(c30.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(list31.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c31 : list31){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(c31.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list32 = customerDao.queryCustomerByParentId(c31.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(list32.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c32 : list32){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(c32.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list33 = customerDao.queryCustomerByParentId(c32.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(list33.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c33 : list33){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c33.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            List<Customer> list34 = customerDao.queryCustomerByParentId(c33.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(list34.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                for(Customer c34 : list34){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(c34.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list35 = customerDao.queryCustomerByParentId(c34.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(list35.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c35 : list35){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(c35.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list36 = customerDao.queryCustomerByParentId(c35.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(list36.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c36 : list36){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(c36.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list37 = customerDao.queryCustomerByParentId(c36.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(list37.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c37 : list37){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c37.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            List<Customer> list38 = customerDao.queryCustomerByParentId(c37.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(list38.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                for(Customer c38 : list38){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(c38.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                List<Customer> list39 = customerDao.queryCustomerByParentId(c38.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(list39.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    for(Customer c39 : list39){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(c39.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List<Customer> list40 = customerDao.queryCustomerByParentId(c39.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(list40.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        for(Customer c40 : list40){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(c40.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }else{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        List<Customer> list41 = customerDao.queryCustomerByParentId(c40.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        if(list41.size() > 0){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for(Customer c41 : list41){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(boo){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if(c41.getLevelCopy4Id() >= levelId){
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        temp += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        boo = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }else{

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                }
                                                                                                                                                                                                                            }
                                                                                                                                                                                                                        }
                                                                                                                                                                                                                    }
                                                                                                                                                                                                                }
                                                                                                                                                                                                            }
                                                                                                                                                                                                        }
                                                                                                                                                                                                    }
                                                                                                                                                                                                }
                                                                                                                                                                                            }
                                                                                                                                                                                        }
                                                                                                                                                                                    }
                                                                                                                                                                                }
                                                                                                                                                                            }
                                                                                                                                                                        }
                                                                                                                                                                    }
                                                                                                                                                                }
                                                                                                                                                            }
                                                                                                                                                        }
                                                                                                                                                    }
                                                                                                                                                }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                        }
                                                                                                                    }
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return temp;
    }

    @Override
    public int queryTeamTotalNumber(Integer userId){
        int rowSize = 0;
        List<AppMailListDTO> list1 = customerDao.queryByMailList_1(userId);
        if(list1.size() > 0){
            rowSize = list1.size();
            for(AppMailListDTO dto1 : list1){
                List<AppMailListDTO> list2 = customerDao.queryByMailList_1(dto1.getUserId());
                if(list2.size() > 0){
                    rowSize += list2.size();
                    for(AppMailListDTO dto2 : list2){
                        List<AppMailListDTO> list3 = customerDao.queryByMailList_1(dto2.getUserId());
                        if(list3.size() > 0){
                            rowSize += list3.size();
                            for(AppMailListDTO dto3 : list3){
                                List<AppMailListDTO> list4 = customerDao.queryByMailList_1(dto3.getUserId());
                                if(list4.size() > 0){
                                    rowSize += list4.size();
                                    for(AppMailListDTO dto4 : list4){
                                        List<AppMailListDTO> list5 = customerDao.queryByMailList_1(dto4.getUserId());
                                        if(list5.size() > 0){
                                            rowSize += list5.size();
                                            for(AppMailListDTO dto5 : list5){
                                                List<AppMailListDTO> list6 = customerDao.queryByMailList_1(dto5.getUserId());
                                                if(list6.size() > 0){
                                                    rowSize += list6.size();
                                                    for(AppMailListDTO dto6 : list6){
                                                        List<AppMailListDTO> list7 = customerDao.queryByMailList_1(dto6.getUserId());
                                                        if(list7.size() > 0){
                                                            rowSize += list7.size();
                                                            for(AppMailListDTO dto7 : list7){
                                                                List<AppMailListDTO> list8 = customerDao.queryByMailList_1(dto7.getUserId());
                                                                if(list8.size() > 0){
                                                                    rowSize += list8.size();
                                                                    for(AppMailListDTO dto8 : list8){
                                                                        List<AppMailListDTO> list9 = customerDao.queryByMailList_1(dto8.getUserId());
                                                                        if(list9.size() > 0){
                                                                            rowSize += list9.size();
                                                                            for(AppMailListDTO dto9 : list9){
                                                                                List<AppMailListDTO> list10 = customerDao.queryByMailList_1(dto9.getUserId());
                                                                                if(list10.size() > 0){
                                                                                    rowSize += list10.size();
                                                                                    for(AppMailListDTO dto10 : list10){
                                                                                        List<AppMailListDTO> list11 = customerDao.queryByMailList_1(dto10.getUserId());
                                                                                        if(list11.size() > 0){
                                                                                            rowSize += list11.size();
                                                                                            for(AppMailListDTO dto11 : list11){
                                                                                                List<AppMailListDTO> list12 = customerDao.queryByMailList_1(dto11.getUserId());
                                                                                                if(list12.size() > 0){
                                                                                                    rowSize += list12.size();
                                                                                                    for(AppMailListDTO dto12 : list12){
                                                                                                        List<AppMailListDTO> list13 = customerDao.queryByMailList_1(dto12.getUserId());
                                                                                                        if(list13.size() > 0){
                                                                                                            rowSize += list13.size();
                                                                                                            for(AppMailListDTO dto13 : list13){
                                                                                                                List<AppMailListDTO> list14 = customerDao.queryByMailList_1(dto13.getUserId());
                                                                                                                if(list14.size() > 0){
                                                                                                                    rowSize += list14.size();
                                                                                                                    for(AppMailListDTO dto14 : list14){
                                                                                                                        List<AppMailListDTO> list15 = customerDao.queryByMailList_1(dto14.getUserId());
                                                                                                                        if(list15.size() > 0){
                                                                                                                            rowSize += list15.size();
                                                                                                                            for(AppMailListDTO dto15 : list15){
                                                                                                                                List<AppMailListDTO> list16 = customerDao.queryByMailList_1(dto15.getUserId());
                                                                                                                                if(list16.size() > 0){
                                                                                                                                    rowSize += list16.size();
                                                                                                                                    for(AppMailListDTO dto16 : list16){
                                                                                                                                        List<AppMailListDTO> list17 = customerDao.queryByMailList_1(dto16.getUserId());
                                                                                                                                        if(list17.size() > 0){
                                                                                                                                            rowSize += list17.size();
                                                                                                                                            for(AppMailListDTO dto17 : list17){
                                                                                                                                                List<AppMailListDTO> list18 = customerDao.queryByMailList_1(dto17.getUserId());
                                                                                                                                                if(list18.size() > 0){
                                                                                                                                                    rowSize += list18.size();
                                                                                                                                                    for(AppMailListDTO dto18 : list18){
                                                                                                                                                        List<AppMailListDTO> list19 = customerDao.queryByMailList_1(dto18.getUserId());
                                                                                                                                                        if(list19.size() > 0){
                                                                                                                                                            rowSize += list19.size();
                                                                                                                                                            for(AppMailListDTO dto19 : list19){
                                                                                                                                                                List<AppMailListDTO> list20 = customerDao.queryByMailList_1(dto19.getUserId());
                                                                                                                                                                if(list20.size() > 0){
                                                                                                                                                                    rowSize += list20.size();
                                                                                                                                                                    for(AppMailListDTO dto20 : list20){
                                                                                                                                                                        List<AppMailListDTO> list21 = customerDao.queryByMailList_1(dto20.getUserId());
                                                                                                                                                                        if(list21.size() > 0){
                                                                                                                                                                            rowSize += list21.size();
                                                                                                                                                                            for(AppMailListDTO dto21 : list21){
                                                                                                                                                                                List<AppMailListDTO> list22 = customerDao.queryByMailList_1(dto21.getUserId());
                                                                                                                                                                                if(list22.size() > 0){
                                                                                                                                                                                    rowSize += list22.size();
                                                                                                                                                                                    for(AppMailListDTO dto22 : list22){
                                                                                                                                                                                        List<AppMailListDTO> list23 = customerDao.queryByMailList_1(dto22.getUserId());
                                                                                                                                                                                        if(list23.size() > 0){
                                                                                                                                                                                            rowSize += list23.size();
                                                                                                                                                                                            for(AppMailListDTO dto23 : list23){
                                                                                                                                                                                                List<AppMailListDTO> list24 = customerDao.queryByMailList_1(dto23.getUserId());
                                                                                                                                                                                                if(list24.size() > 0){
                                                                                                                                                                                                    rowSize += list24.size();
                                                                                                                                                                                                    for(AppMailListDTO dto24 : list24){
                                                                                                                                                                                                        List<AppMailListDTO> list25 = customerDao.queryByMailList_1(dto24.getUserId());
                                                                                                                                                                                                        if(list25.size() > 0){
                                                                                                                                                                                                            rowSize += list25.size();
                                                                                                                                                                                                            for(AppMailListDTO dto25 : list25){
                                                                                                                                                                                                                List<AppMailListDTO> list26 = customerDao.queryByMailList_1(dto25.getUserId());
                                                                                                                                                                                                                if(list26.size() > 0){
                                                                                                                                                                                                                    rowSize += list26.size();
                                                                                                                                                                                                                    for(AppMailListDTO dto26 : list26){
                                                                                                                                                                                                                        List<AppMailListDTO> list27 = customerDao.queryByMailList_1(dto26.getUserId());
                                                                                                                                                                                                                        if(list27.size() > 0){
                                                                                                                                                                                                                            rowSize += list27.size();
                                                                                                                                                                                                                            for(AppMailListDTO dto27 : list27){
                                                                                                                                                                                                                                List<AppMailListDTO> list28 = customerDao.queryByMailList_1(dto27.getUserId());
                                                                                                                                                                                                                                if(list28.size() > 0){
                                                                                                                                                                                                                                    rowSize += list28.size();
                                                                                                                                                                                                                                    for(AppMailListDTO dto28 : list28){
                                                                                                                                                                                                                                        List<AppMailListDTO> list29 = customerDao.queryByMailList_1(dto28.getUserId());
                                                                                                                                                                                                                                        if(list29.size() > 0){
                                                                                                                                                                                                                                            rowSize += list29.size();
                                                                                                                                                                                                                                            for(AppMailListDTO dto29 : list29){
                                                                                                                                                                                                                                                List<AppMailListDTO> list30 = customerDao.queryByMailList_1(dto29.getUserId());
                                                                                                                                                                                                                                                if(list30.size() > 0){
                                                                                                                                                                                                                                                    rowSize += list30.size();
                                                                                                                                                                                                                                                    for(AppMailListDTO dto30 : list30){
                                                                                                                                                                                                                                                        List<AppMailListDTO> list31 = customerDao.queryByMailList_1(dto30.getUserId());
                                                                                                                                                                                                                                                        if(list31.size() > 0){
                                                                                                                                                                                                                                                            rowSize += list31.size();
                                                                                                                                                                                                                                                            for(AppMailListDTO dto31 : list31){
                                                                                                                                                                                                                                                                List<AppMailListDTO> list32 = customerDao.queryByMailList_1(dto31.getUserId());
                                                                                                                                                                                                                                                                if(list32.size() > 0){
                                                                                                                                                                                                                                                                    rowSize += list32.size();
                                                                                                                                                                                                                                                                    for(AppMailListDTO dto32 : list32){
                                                                                                                                                                                                                                                                        List<AppMailListDTO> list33 = customerDao.queryByMailList_1(dto32.getUserId());
                                                                                                                                                                                                                                                                        if(list33.size() > 0){
                                                                                                                                                                                                                                                                            rowSize += list33.size();
                                                                                                                                                                                                                                                                            for(AppMailListDTO dto33 : list33){
                                                                                                                                                                                                                                                                                List<AppMailListDTO> list34 = customerDao.queryByMailList_1(dto33.getUserId());
                                                                                                                                                                                                                                                                                if(list34.size() > 0){
                                                                                                                                                                                                                                                                                    rowSize += list34.size();
                                                                                                                                                                                                                                                                                    for(AppMailListDTO dto34 : list34){
                                                                                                                                                                                                                                                                                        List<AppMailListDTO> list35 = customerDao.queryByMailList_1(dto34.getUserId());
                                                                                                                                                                                                                                                                                        if(list35.size() > 0){
                                                                                                                                                                                                                                                                                            rowSize += list35.size();
                                                                                                                                                                                                                                                                                            for(AppMailListDTO dto35 : list35){
                                                                                                                                                                                                                                                                                                List<AppMailListDTO> list36 = customerDao.queryByMailList_1(dto35.getUserId());
                                                                                                                                                                                                                                                                                                if(list36.size() > 0){
                                                                                                                                                                                                                                                                                                    rowSize += list36.size();
                                                                                                                                                                                                                                                                                                    for(AppMailListDTO dto36 : list36){
                                                                                                                                                                                                                                                                                                        List<AppMailListDTO> list37 = customerDao.queryByMailList_1(dto36.getUserId());
                                                                                                                                                                                                                                                                                                        if(list37.size() > 0){
                                                                                                                                                                                                                                                                                                            rowSize += list37.size();
                                                                                                                                                                                                                                                                                                            for(AppMailListDTO dto37 : list37){
                                                                                                                                                                                                                                                                                                                List<AppMailListDTO> list38 = customerDao.queryByMailList_1(dto37.getUserId());
                                                                                                                                                                                                                                                                                                                if(list38.size() > 0){
                                                                                                                                                                                                                                                                                                                    rowSize += list38.size();
                                                                                                                                                                                                                                                                                                                    for(AppMailListDTO dto38 : list38){
                                                                                                                                                                                                                                                                                                                        List<AppMailListDTO> list39 = customerDao.queryByMailList_1(dto38.getUserId());
                                                                                                                                                                                                                                                                                                                        if(list39.size() > 0){
                                                                                                                                                                                                                                                                                                                            rowSize += list39.size();
                                                                                                                                                                                                                                                                                                                            for(AppMailListDTO dto39 : list39){
                                                                                                                                                                                                                                                                                                                                List<AppMailListDTO> list40 = customerDao.queryByMailList_1(dto39.getUserId());
                                                                                                                                                                                                                                                                                                                                if(list40.size() > 0){
                                                                                                                                                                                                                                                                                                                                    rowSize += list40.size();

                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                }
                                                                                                                                                                                                                            }
                                                                                                                                                                                                                        }
                                                                                                                                                                                                                    }
                                                                                                                                                                                                                }
                                                                                                                                                                                                            }
                                                                                                                                                                                                        }
                                                                                                                                                                                                    }
                                                                                                                                                                                                }
                                                                                                                                                                                            }
                                                                                                                                                                                        }
                                                                                                                                                                                    }
                                                                                                                                                                                }
                                                                                                                                                                            }
                                                                                                                                                                        }
                                                                                                                                                                    }
                                                                                                                                                                }
                                                                                                                                                            }
                                                                                                                                                        }
                                                                                                                                                    }
                                                                                                                                                }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                        }
                                                                                                                    }
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return rowSize;
    }

}
